import Vue from 'vue'
//路由设置引入路由
import VueRouter from 'vue-router'
import {Lazyload} from 'vant'
//注册
Vue.use(VueRouter)
Vue.use(Lazyload)
import Home from '@/views/Friend'
import Detail from '@/views/article-detail'
import Drinking from '@/views/Drinking'
import Eat from '@/views/Eat'
import Friend from '@/views/Friend'
import Ganfan from '@/views/Ganfan'
import User from '@/views/user'
import Login from '@/views/login'
import Register from '@/views/register'
import Shanghai from '@/views/shanghai'
import HouseMap from '@/views/houseMap'
import GoRentout from '@/views/goRentout'


//配置路由组件
const router = new VueRouter({
  routes:[
    {
   path:'/',
   redirect: "/home/Drinking"
    },
    {
    path:"/home",
    component:Home,
    children:[
      {
        path:"Drinking",
        component:Drinking
      },
      {
        path:'Eat',
        component:Eat
      },
      {
        path:'Friend',
        component:Friend
      },
      {
        path:'Ganfan',
        component:Ganfan

      },
      {
        path:'user',
        component:User
      }
    ]
  },
  {
    path:"/login",
    component:Login
  },
  {
    path:"/register",
    component:Register
  },
  {
    path:"/detail",
    component:Detail
  },
  {
    path:"/shanghai",
    component:Shanghai
  },
  {
    path:"/houseMap",
    name:"HouseMap",
    component:HouseMap
  },
  {
    path:"/goRentout",
    component:GoRentout
  },

  ]
})
export default router